﻿@{
    ViewBag.Title = "ViewCategory";
    Layout = "~/Views/Shared/_Layout.cshtml";
}



@section Header
{

}

<body>
    <h2>ViewCategory</h2>

    @*分类*@
    @{ IList<CategoryInfo> categoryList = ViewData["CategoryList"] as List<CategoryInfo>; }

    <table width="400" border="1" cellpadding="0" cellspacing="0">
        @foreach (var item in categoryList)
        { 
            <tr>
                <td width="500" style="border-bottom: 1px dashed #2894F6;">@Html.ActionLink(item.CategoryName, "ViewCategory", new { moduleid = item.ModuleID, categoryid = item.CategoryID })
                </td>
            </tr> 
        }
    </table>

    @*表格*@
    <div>
        <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
            @{
                IList<NewsInfo> news = ViewData["News"] as List<NewsInfo>;
                foreach (NewsInfo item in news)
                {
                <tr>
                    <td width="500" style="border-bottom: 1px dashed #2894F6;">@Html.ActionLink(item.Title, "ViewNews", new { id = item.NewsID })
                    </td>
                    <td width="300" style="border-bottom: 1px dashed #2894F6;">@item.AddTime
                    </td>
                </tr>
                }
            }
        </table>
        <p>
            @Html.Pager("pager", ViewData["pager"] as PagerInfo)
        </p>
    </div>
</body>
